how to calculate battery backup time